package com.cskaoyan.controller;

import com.cskaoyan.module.bean.BaseRespVo;
import com.cskaoyan.module.bo.CommentListBO;
import com.cskaoyan.module.pojo.MarketComment;
import com.cskaoyan.service.CommentService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 处理有关评论的业务
 * 创建日期: 2022/04/10 13:06
 *
 * @author Administrator
 */
@RestController
@RequestMapping("admin/comment")
public class CommentController {
    @Autowired
    CommentService commentService;

    @GetMapping("list")
    public BaseRespVo list(CommentListBO commentListBO){
        BaseRespVo baseRespVo = commentService.commentList(commentListBO);

        return baseRespVo;
    }
    @PostMapping("delete")
    public BaseRespVo delete(@RequestBody MarketComment marketComment){
        BaseRespVo baseRespVo = commentService.deleteComment(marketComment);

        return baseRespVo;
    }
}
